﻿using Microsoft.Extensions.DependencyInjection;

namespace RuoYi.Framework.ObjectMapping.Mapster;

public static class MapsterExtensions
{
    /// <summary>
    /// 配置服务
    /// </summary>
    public static IServiceCollection AddMapster(this IServiceCollection services)
    {
        // 注册Mapster相关服务
        services.AddTransient<IAutoObjectMappingProvider, MapsterAutoObjectMappingProvider>();
        services.AddTransient<IObjectMapper, MapsterObjectMapper>();
        return services;
    }

}
